home *** CD-ROM | disk | FTP | other *** search
- // copyright 1993 Michael B. Johnson; some portions copyright 1994, MIT
- // see COPYRIGHT for reuse legalities
- //
-
-
- #import "WW3DSnapShot.h"
-
- @implementation WW3DSnapShot
-
- - initFromCamera:aCamera
- {
- [super init];
- backgroundColor = [aCamera backgroundColor];
- doesDrawBackgroundColor = [aCamera doesDrawBackgroundColor];
-
- hider = [aCamera hider];
- [aCamera getProjectionRectangle:&l :&r :&t :&b];
- projectionType = [aCamera projectionType];
-
- [aCamera getPreTransformMatrix:preTransform];
- [aCamera getTransformMatrix:transform]; // need to implement this in WW3DCamera
- usesPreTransformMatrix = [aCamera usesPreTransformMatrix];
-
- [aCamera getEyeAt:&eyePoint toward:&viewPoint roll:&rollAngle];
- [aCamera getClipPlanesNear:&nearPlane far:&farPlane];
-
- fieldOfView = [aCamera fieldOfView];
- pixelAspectRatio = [aCamera pixelAspectRatio];
-
- return self;
- }
-
- - snapCamera:aCamera
- {
- return self;
- }
-
- - (char *)writeAsTcl
- {
- // really should have this archive itself to a stream
- // anyway...
- // should also have an initFromTcl:(const char *)tclExpression tclInterp:aTclInterp
- // anyway...
- // the basic idea here is that the WW3DSnapShot needs to turn itself
- // into the equivalent tcl code that it could be init'ed from
-
- return NULL;
- }
-
- - applyToCamera:aCamera
- {
-
- [aCamera setBackgroundColor:backgroundColor];
- [aCamera setHider:hider];
- [aCamera setProjectionRectangle:l :r :t :b];
- [aCamera setProjection:projectionType];
- [aCamera setPreTransformMatrix:preTransform];
- [aCamera setUsePreTransformMatrix:usesPreTransformMatrix];
- [aCamera setEyeAt:eyePoint toward:viewPoint roll:rollAngle];
- [aCamera setClipPlanesNear:nearPlane far:farPlane];
- [aCamera setFieldOfViewByAngle:fieldOfView];
- [aCamera setPixelAspectRatio:pixelAspectRatio];
-
- return self;
- }
-
- @end
-